home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Technical Documentation / Sample Code / DTS_SCSI Code (In Development) / DTS_SCSI_Application.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-15  |  3.5 KB  |  122 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DTS_SCSI_Application.h
  3.     
  4.     
  5.     
  6.     Unfortunately, no matter how long awaited, it's still not done.  In fact, this
  7. isn't even a release- this is just an image of the code taken in the middle of
  8. development.
  9.  
  10. THIS CODE DOES NOT WORK AS A WHOLE.  MUCH OF IT IS BUGGY AND / OR INCOMPLETE.
  11. YOU WOULD HAVE TO BE ABSOLUTELY INSANE TO USE ANY OF THIS CODE IN YOUR
  12. PROJECT WITHOUT EXTENSIVE THOUGHT, DEBUGGING AND TESTING.
  13.  
  14.  
  15.  
  16.  
  17.  
  18.     Contains:    common declarations for DTS' SCSI formatting application sample,
  19.                 included by both DTS_SCSI_Application.c and DTS_SCSI_Application.r
  20.                 (Because Rez doesn't understand C++-style slash-slash comments,
  21.                 ordinary C slash-star/star-slash comments must be used here).
  22.  
  23.     Written by:    Colleen Delgadillo, Dennis Hescox, Kent Sandvik, Bryan Stearns
  24.  
  25.     Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  26.  
  27.     Change History (most recent first):
  28.  
  29.                  3/10/92    BJS        convert from Sample.h
  30.  
  31.     To Do:
  32.     
  33.     Notes:
  34.         Like DTS_SCSI_Application.c, this file was extracted from Apple's
  35.         simple Sample application. Many of the original Sample.h comments
  36.         have been removed so that we can concentrate on SCSI issues; see
  37.         the original Sample.h (included with MPW, among other places) for
  38.         background information.
  39. */
  40.  
  41. /*
  42.  * Configuration constants
  43.  */
  44. #define kMinimumSpace        (80 * 1024)        /* minimum free RAM to run */
  45. #define kProductName        "Apple HD80SC"    /* the name of our product, used in string resources */
  46.  
  47. /* 
  48.  * Resource ID constants
  49.  */
  50.  
  51. /* Our main dialog window, and the items in it */
  52. #define    kMainDialog     128    /* Our main window */
  53. #define    kQuitButton        1
  54. #define kAboutButton    2
  55. #define kTestButton        3
  56. #define kUpdateButton    4
  57. #define kFormatButton    5
  58. #define    kDriveButton    6
  59. #define kMessageText    7
  60. #define kDriveInfoText    8
  61. #define kFirstUserItem    9
  62. #define kLastUserItem    11
  63.  
  64. /* Other dialogs */
  65. #define kAboutBox                129    /* Our about box */
  66. #define kConfirmFormatAlert        130    /* OK to format? */
  67. #define    kInsufficientSystem        131    /* alert: We can't run on this machine or system software! */
  68.  
  69. /* Our string list */
  70. #define kStringList             128
  71.  
  72. #define    kEmptyString            1
  73. #define    kVolumeNameString        2
  74. #define    kVendorString            3
  75. #define    kProductString            4
  76. #define    kRevisionString            5
  77. #define    kExplanation            6
  78. #define    kNoSCSIDevices            7
  79. #define    kNoneOfOurDevice        8
  80. #define    kCommunicationError        9
  81. #define    kFormatError            10
  82. #define    kPartitioningError        11
  83. #define    kUnknownLowLevelError    12
  84. #define    kOnlyOneOfOurDevice        13
  85. #define    kFormatting                14
  86. #define    kTesting                15
  87. #define    kFormattingCompleted    16
  88. #define kUpdating                17
  89. #define kUpdateCompleted        18
  90. #define kUpdateError            19
  91.  
  92. /* Other resources */
  93. #define kDogCowCircle            132
  94. #define kDogCowMessage            133
  95. #define kErrorMappingResourceType 'eror'
  96. #define kErrorMappingResourceID    128    /* The resource we use to map error codes to messages for alerts */
  97.  
  98.  
  99. /*
  100.  * The format of our error resource. This illustrates the flexibility of including the 
  101.  * same file from both C and the resource compiler Rez. Rez automatically defines the
  102.  * preprocessor macro "Rez", so we can conditionally compile the same declaration in
  103.  * two different flavors for the two environments, as shown here. This allows us to
  104.  * maintain both definitions in one place, making it easier to keep the definitions
  105.  * consistent with each other!
  106.  */
  107. #ifdef Rez
  108. /* The "Rez" type declaration */
  109. type 'eror' {                                // ***  Are we using this?
  110.     wide array {
  111.         integer;
  112.         pstring[255];
  113.     };
  114. };
  115. #else
  116. /* the "C" type declaration */
  117. typedef struct {
  118.     short errNum;
  119.     Str255 message;
  120. } ErrorMapping, **ErrorMappingHandle;
  121. #endif
  122.